package com.pool.activity.common;

import android.app.ListActivity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

/**
 * {@link ListActivity} that automatically switches to fullscreen at creation time.
 * 
 * @author claveld@gmail.com (David Clavel)
 */
public abstract class FullscreenListActivity extends ListActivity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setFullscreen();
  }
  
  private void setFullscreen() {
    requestWindowFeature(Window.FEATURE_NO_TITLE); 
    getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
            WindowManager.LayoutParams.FLAG_FULLSCREEN); 
  }
}
